<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="keywords"
          content="admin, dashboard, bootstrap, template, flat, modern, theme, responsive, fluid, retina, backend, html5, css, css3">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>教师首页-数据统计展示模块</title>

    <![endif]-->
</head>
<body class="sticky-header">

<!-- left side start-->

<div class="left-side sticky-left-side">

    <!--logo and iconic logo start-->
    <div class="logo">
        <a onclick="clicklogo()"><img src="/images/logo.png" alt="" style="width: 70%;height: 70%"></a>
    </div>

    <div class="logo-icon text-center">
        <a href="index.html"><img src="/images/logo_icon.png" alt=""></a>
    </div>
    <!--logo and iconic logo end-->

    <div class="left-side-inner">

        <!-- visible to small devices only -->
        <div class="visible-xs hidden-sm hidden-md hidden-lg">
            <div class="media logged-user">

            </div>

            <h5 class="left-nav-title">商院就业系统</h5>
            <ul class="nav nav-pills nav-stacked custom-nav">
                <li class="menu-list"><a href=""><i class="fa fa-book"></i> <span>个人中心</span></a>
                    <ul class="sub-menu-list">
                        <li><a data-toggle="modal" data-target="#myModalInfo" onclick="selectTeaBaseInfo()"><i
                                class="fa fa-user"></i> 基础信息</a></li>
                        <li><a data-toggle="modal" data-target="#myModalInfoRelease"><i class="fa fa-user"></i> 信息发布</a>
                        </li>
                        <li><a data-toggle="modal" data-target="#myModal"><i class="fa fa-cog"></i>修改密码</a></li>
                        <li><a onclick="deleteAcount()"><i class="fa fa-cog"></i>注销账号</a></li>
                        <li><a onclick="loginout()"><i class="fa fa-sign-out"></i> 退出登录</a></li>
                    </ul>
                </li>
            </ul>
        </div>

        <!--sidebar nav start-->
        <ul class="nav nav-pills nav-stacked custom-nav">
            <li class="menu-list"><a onclick="teacherindex()"><i class="fa fa-book"></i> <span>学生管理</span></a>

            </li>

            <li class="menu-list"><a onclick="employmentdistribution()"><i class="fa fa-map-marker"></i>
                <span>就业分布</span></a>

            </li>
        </ul>
        <!--sidebar nav end-->

    </div>
</div>

<!-- left side end-->


<!-- main content start-->
<div class="main-content">

    <!-- header section start-->
    <div class="header-section">

        <!--toggle button start-->
        <a class="toggle-btn"><i class="fa fa-bars"></i></a>
        <!--toggle button end-->

        <!--search start-->
        <form class="searchform" id="searchform">

        </form>
        <!--search end-->

        <!--notification menu start -->
        <div class="menu-right">
            <ul class="notification-menu">
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <span id="currentuser"></span>! 个人中心
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-usermenu">
                        <li><a data-toggle="modal" data-target="#myModalInfo" onclick="selectTeaBaseInfo()"><i
                                class="fa fa-user"></i> 基础信息</a></li>
                        <li><a data-toggle="modal" data-target="#myModalInfoRelease"><i class="fa fa-user"></i> 信息发布</a>
                        </li>
                        <li><a data-toggle="modal" data-target="#myModal"><i class="fa fa-cog"></i>修改密码</a></li>
                        <li><a onclick="deleteAcount()"><i class="fa fa-cog"></i>注销账号</a></li>
                        <li><a onclick="loginout()"><i class="fa fa-sign-out"></i> 退出登录</a></li>
                    </ul>
                </li>

            </ul>
        </div>


    </div>

    <div class="page-heading">

        <h4 class="text-muted"style="font-size:22px;margin-left:1%">数据统计展示</h4>


        <div class="wrapper">

            <div class="row">
                <div class="col-md-4">


                    <div class="panel" style="height: 350px;text-align: center">
                        <br>
                        <h5>学院就业排名</h5>
                        <div id="piechart1" style="height: 100%;margin-top: -50px"></div>
                    </div>
                </div>
                <div class="col-md-4">


                    <div class="panel" style="height: 350px;text-align: center">
                        <br>
                        <h5>系统就业占比</h5>
                        <div id="piechart" style="height: 100%;margin-top: -50px"></div>
                    </div>
                </div>
                <div class="col-md-4">

                    <section class="panel">
                        <div class="panel-body">
                            <div class="summary">
                                <span class="text-muted"><h5>招聘企业数量</h5></span>
                                <h3 class="red-txt"><span id="compCount"></span>家</h3>
                            </div>
                        </div>
                    </section>
                    <section class="panel">
                        <div class="panel-body">
                            <div class="summary">
                                <span class="text-muted"><h5>招聘岗位总数</h5></span>
                                <h3 class="green-txt"><span id="jobCount"></span>个</h3>
                            </div>
                        </div>
                    </section>
                    <section class="panel">
                        <div class="panel-body">
                            <div class="summary">
                                <span class="text-muted"><h5>招聘行业总数</h5></span>
                                <h3 class="green-txt"><span id="kindCount"></span>个</h3>
                            </div>
                        </div>
                    </section>

                </div>
            </div>

            <div class="row">
                <div class="col-md-6">

                    <div class="panel" style="height: 310px;text-align: center">
                        <br>
                        <h5>各行业就业岗位数量</h5>
                        <div id="container" class="panel" style="height: 300px;"></div>
                    </div>

                </div>
                <div class="col-md-6">

                    <div class="panel" style="height: 310px;text-align: center">
                        <br>
                        <h5>历年招聘就业率</h5>
                        <div id="employmentRate" class="panel" style="height: 300px;"></div>
                    </div>

                </div>
            </div>
            <div class="row">
                <div class="col-md-8"></div>
                <div class="col-md-4"></div>
            </div>
            <div class="row">
                <div class="col-md-4"></div>
                <div class="col-md-4"></div>
                <div class="col-md-4"></div>
            </div>
            <div class="row">
                <div class="col-md-4"></div>
                <div class="col-md-4"></div>
                <div class="col-md-4"></div>
            </div>
        </div>
        <!--body wrapper end-->


    </div>


    <!--body wrapper end-->

    <!--footer section start-->
    <footer>
        商洛学院信息管理与信息系统毕业设计
    </footer>
    <!--footer section end-->
</div>

<!--用户修改密码-->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">
                    用户密码修改
                </h4>
            </div>
            <div class="modal-body">
                <input type="password" class="form-control" placeholder="原密码" autofocus name="u_oldpwd" id="u_oldpwd"
                       onblur="checkpwd()"><br><br>
                <input type="password" class="form-control" placeholder="新密码" name="u_newpwd" id="u_newpwd"><br><br>
                <input type="password" class="form-control" placeholder="确认新密码" name="u_surenewpwd"
                       id="u_surenewpwd"><br><br>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary" onclick="submitpwd()">
                    提交更改
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!--老师信息完善-->
<div class="modal fade" id="myModalInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabeInfo">
                    基础信息完善
                </h4>
            </div>
            <div class="modal-body">
                <form action="" id="myFormInfo">
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="tea_name" style="margin-top: 8px">姓名:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control col-sm-10" placeholder="姓名" autofocus name="tea_name"
                                   id="tea_name">
                        </div>
                    </div>
                    <br>
                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="tea_code" style="margin-top: 8px">工号:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="工号" autofocus name="tea_code"
                                   id="tea_code">
                        </div>
                    </div>
                    <br>
                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="tea_schoolname" style="margin-top: 8px">学校名称:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="tea_schoolname" id="tea_schoolname"
                                   value="商洛学院" readonly="readonly">
                        </div>
                    </div>
                    <br>
                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="tea_department" style="margin-top: 8px">所在院系:</label>
                        <div class="col-sm-10">
                            <!--                          <input type="text" class="form-control" placeholder="所在院系" name="tea_department" id="tea_department">-->
                            <select class="form-control" placeholder="所在院系" name="tea_department" id="tea_department">

                            </select>
                        </div>
                    </div>
                    <br>


                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="tea_duties" style="margin-top: 8px">个人职务:</label>
                        <div class="col-sm-10">
                            <select class="form-control" placeholder="个人职务" name="tea_duties" id="tea_duties">

                            </select>
                        </div>
                    </div>
                    <br>

                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="tea_tel" style="margin-top: 8px">手机号码:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="手机号码" name="tea_tel" id="tea_tel">
                        </div>
                    </div>
                    <br>

                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="tea_qq" style="margin-top: 8px">QQ号码:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="QQ号码" name="tea_qq" id="tea_qq">
                        </div>
                    </div>
                    <br>
                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="tea_email" style="margin-top: 8px">电子邮箱:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="电子邮箱" name="tea_email" id="tea_email">
                        </div>
                    </div>
                    <br><br><br><br><br><br><br><br>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary" onclick="submitTeaBaseInfo()">
                    保存信息
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!--校招信息发布-->
<div class="modal fade" id="myModalInfoRelease" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabeInfoRelease">
                    校招信息发布
                </h4>
            </div>
            <div class="modal-body">
                <form action="" id="myFormInfoRelease">
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="recruit_time" style="margin-top: 8px">校招时间:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="校招时间" autofocus name="recruit_time"
                                   id="recruit_time" AUTOCOMPLETE="off">
                        </div>
                    </div>
                    <br>
                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="recruit_name" style="margin-top: 8px">企业名称:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="企业名称" autofocus name="recruit_name"
                                   id="recruit_name">
                        </div>
                    </div>
                    <br>

                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="recruit_address"
                               style="margin-top: 8px">校招地点:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="校招地点" name="recruit_address"
                                   id="recruit_address">
                        </div>
                    </div>
                    <br>

                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="recruit_people" style="margin-top: 8px">联系人:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="联系人" name="recruit_people"
                                   id="recruit_people">
                        </div>
                    </div>
                    <br>

                    <div class="form-group" style="margin-top: 30px">
                        <label class="col-sm-2 control-label" for="recruit_peopletel"
                               style="margin-top: 8px">联系电话:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="联系电话" name="recruit_peopletel"
                                   id="recruit_peopletel">
                        </div>
                    </div>
                    <br>


                    <div class="form-group" style="text-align: center">
                        <span>招聘岗位</span>
                        <textarea class="form-control" rows="5" id="recruit_job" name="recruit_job"></textarea>
                    </div>
                    <div class="form-group" style="text-align: center">
                        <span><h5>技能要求</h5></span>
                        <textarea class="form-control" rows="5" id="recruit_material"
                                  name="recruit_material"></textarea>
                    </div>
                    <div class="form-group" style="text-align: center">
                        <span><h5>薪资福利</h5></span>
                        <textarea class="form-control" rows="5" id="recruit_salary" name="recruit_salary"></textarea>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary" onclick="submitReleaseInfo()">
                    保存信息
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!--校招信息发布-->
<div class="modal fade" id="myModalTalk" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">
                    与<span id="stu_name_talk"></span>的对话框
                </h4>
            </div>
            <div class="modal-body">

                <div style="height: 350px;width: 100%;border: 1px solid #D3D3D3;overflow-y: auto">


                </div>
                <br>
                <textarea class="form-control" rows="5" id="" name="recruit_salary"></textarea>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary">
                    发送
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>

            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!--学生详情选项卡-->
<div class="modal fade" id="myModalChooseInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true" style="margin-top: 5%">


    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabeRecruitInfo">
                    学生信息查看
                </h4>
            </div>
            <ul class="nav nav-tabs">
                <li><a href="#con1" rel="external nofollow" data-toggle="tab">基础信息</a></li>
                <li><a href="#con2" rel="external nofollow" data-toggle="tab">学籍信息</a></li>
                <li><a href="#con3" rel="external nofollow" data-toggle="tab">就业信息</a></li>
            </ul>
            <!--选项卡的内容-->
            <div class="tab-content">
                <div id="con1" class="tab-pane">
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="stu_name_tea" style="margin-top: 8px">姓名:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="姓名" autofocus name="stu_name"
                                       id="stu_name_tea" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 15px">
                            <label class="col-sm-2 control-label" for="stu_sex" style="margin-top: 8px">性别:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" placeholder="性别" name="stu_sex" id="stu_sex"
                                       readonly="readonly">
                            </div>
                            <label class="col-sm-2 control-label" for="stu_politics"
                                   style="margin-top: 8px">政治面貌:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" placeholder="政治面貌" name="stu_politics"
                                       id="stu_politics" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_idcard" style="margin-top: 8px">身份证:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="身份证号" name="stu_idcard"
                                       id="stu_idcard" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_tel" style="margin-top: 8px">手机号:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="手机号码" name="stu_tel" id="stu_tel"
                                       readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_qq" style="margin-top: 8px">QQ号码:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="QQ号码" name="stu_qq" id="stu_qq"
                                       readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_email" style="margin-top: 8px">电子邮箱:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="电子邮箱" name="stu_email"
                                       id="stu_email" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_address"
                                   style="margin-top: 8px">家庭住址:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="家庭住址" name="stu_address"
                                       id="stu_address" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_fromaddress"
                                   style="margin-top: 8px">生源地:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="生源地" name="stu_fromaddress"
                                       id="stu_fromaddress" readonly="readonly">
                            </div>

                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_ec" style="margin-top: 8px">联系人:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="紧急联系人" name="stu_ec" id="stu_ec"
                                       readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_ectel" style="margin-top: 8px">联系电话:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="紧急联系人电话" name="stu_ectel"
                                       id="stu_ectel" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_counselor"
                                   style="margin-top: 8px">辅导员:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="辅导员姓名" name="stu_counselor"
                                       id="stu_counselor" readonly="readonly">
                            </div>
                        </div>
                        <br>
                    </div>
                </div>
                <div id="con2" class="tab-pane">
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="stu_code_tea" style="margin-top: 8px">学号:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="学号" autofocus name="stu_code"
                                       id="stu_code_tea" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 15px">
                            <label class="col-sm-2 control-label" for="stu_schoolname"
                                   style="margin-top: 8px">学校名称:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="stu_schoolname" id="stu_schoolname"
                                       value="商洛学院" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_department"
                                   style="margin-top: 8px">院系:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="stu_department" id="stu_department"
                                       value="院系" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_profession_tea"
                                   style="margin-top: 8px">专业:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="stu_profession" id="stu_profession_tea"
                                       value="专业" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_class_tea"
                                   style="margin-top: 8px">班级:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="班级" name="stu_class"
                                       id="stu_class_tea" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_education"
                                   style="margin-top: 8px">学历:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" placeholder="学历" name="stu_education"
                                       id="stu_education" readonly="readonly">
                            </div>
                            <label class="col-sm-2 control-label" for="stu_inway" style="margin-top: 8px">大学学制:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" placeholder="大学学制" name="stu_inway"
                                       id="stu_inway" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_inTime" style="margin-top: 8px">入学时间:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" placeholder="入学时间" name="stu_inTime"
                                       id="stu_inTime" readonly="readonly">
                            </div>
                            <label class="col-sm-2 control-label" for="stu_outTime"
                                   style="margin-top: 8px">毕业时间:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" placeholder="毕业时间" name="stu_outTime"
                                       id="stu_outTime" readonly="readonly">
                            </div>
                        </div>
                        <br>
                    </div><!-- /.modal-content -->
                </div>
                <div id="con3" class="tab-pane">
                    <div class="modal-body">

                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="stu_compjobstatus"
                                   style="margin-top: 8px">就业状态:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="就业状态" name="stu_compjobstatus"
                                       id="stu_compjobstatus" readonly="readonly">
                            </div>

                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 15px">
                            <label class="col-sm-2 control-label" for="stu_compagreement"
                                   style="margin-top: 8px">三方编号:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="三方协议书编号" name="stu_compagreement"
                                       id="stu_compagreement" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_compname"
                                   style="margin-top: 8px">单位名称:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="单位名称" autofocus name="stu_compname"
                                       id="stu_compname" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_compcode"
                                   style="margin-top: 8px">信用代码:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="统一社会信用代码/组织机构代码"
                                       name="stu_compcode" id="stu_compcode" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_compnature"
                                   style="margin-top: 8px">单位性质:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="单位性质" name="stu_compnature"
                                       id="stu_compnature" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_compkind"
                                   style="margin-top: 8px">单位行业:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="单位行业" name="stu_compkind"
                                       id="stu_compkind" readonly="readonly">
                            </div>
                        </div>
                        <br>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_compaddress"
                                   style="margin-top: 8px">单位地址:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="单位地址" name="stu_compaddress"
                                       id="stu_compaddress" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_compjob"
                                   style="margin-top: 8px">个人岗位:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="个人岗位" name="stu_compjob"
                                       id="stu_compjob" readonly="readonly">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label" for="stu_compjobguide"
                                   style="margin-top: 8px">指导老师:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="指导老师" name="stu_compjobguide"
                                       id="stu_compjobguide" readonly="readonly">
                            </div>
                        </div>
                        <br>
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<script src="/js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
<script src="/js/jquery-migrate-1.2.1.min.js " type="text/javascript"></script>
<script src="/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/js/modernizr.min.js" type="text/javascript"></script>
<script src="/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="/js/js/jquery223.min.js" type="text/javascript"></script>
<!--icheck-->
<link href="/js/iCheck/skins/minimal/minimal.css" rel="stylesheet">
<link href="/js/iCheck/skins/square/square.css" rel="stylesheet">
<link href="/js/iCheck/skins/square/red.css" rel="stylesheet">
<link href="/js/iCheck/skins/square/blue.css" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="/css/bootstrap-datetimepicker.css"/>

<!--dashboard calendar-->
<link href="/css/clndr.css" rel="stylesheet">

<!--Morris Chart CSS -->
<link rel="stylesheet" href="/js/morris-chart/morris.css">

<!--common-->
<link href="/css/style.css" rel="stylesheet">
<link href="/css/style-responsive.css" rel="stylesheet">
<script src="/js/js/bootstrap-table.min.js" type="text/javascript"></script>
<script src="/js/js/bootstrap-table-zh-CN.min.js" type="text/javascript"></script>
<script src="/js/js/bootstrap-table-editable.js" type="text/javascript"></script>
<script src="/js/js/bootstrap-editable.min.js" type="text/javascript"></script>
<script src="/js/js/bootstrap-datetimepicker.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="/css/bootstrap-datetimepicker.css"/>
<script src="/js/bootstrap-datetimepicker.js" type="text/javascript"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]-->
<script src="/js/html5shiv.js" type="text/javascript"></script>
<script src="/js/respond.min.js" type="text/javascript"></script>


<!--easy pie chart-->
<script src="/js/easypiechart/jquery.easypiechart.js"></script>
<script src="/js/easypiechart/easypiechart-init.js"></script>

<!--Sparkline Chart-->
<script src="/js/sparkline/jquery.sparkline.js"></script>
<script src="/js/sparkline/sparkline-init.js"></script>

<!--icheck -->
<script src="/js/iCheck/jquery.icheck.js"></script>
<script src="/js/icheck-init.js"></script>

<!-- jQuery Flot Chart-->
<script src="/js/flot-chart/jquery.flot.js"></script>
<script src="/js/flot-chart/jquery.flot.tooltip.js"></script>
<script src="/js/flot-chart/jquery.flot.resize.js"></script>


<!--Morris Chart-->
<script src="/js/morris-chart/morris.js"></script>
<script src="/js/morris-chart/raphael-min.js"></script>

<!--Calendar-->
<script src="/js/calendar/clndr.js"></script>
<script src="/js/calendar/evnt.calendar.init.js"></script>
<script src="/js/calendar/moment-2.2.1.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<!--common scripts for all pages-->
<script src="/js/scripts.js"></script>

<!--Dashboard Charts-->
<script src="/js/dashboard-chart-init.js"></script>

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-gl/dist/echarts-gl.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-stat/dist/ecStat.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/extension/dataTool.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/map/js/china.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/extension/bmap.min.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=wMTXdYCQbDQsMGo4NcR5jO645sPOla7g"></script>


<script type="text/javascript">


    $('#recruit_time').datetimepicker({
        minView: "month",
        language: 'zh-CN',
        format: 'yyyy-mm-dd hh:ii',
        todayBtn: 1,
        autoclose: true,
        startDate: '2019-09-01 00:00',
    });


    var arr = ["人文学院", "艺术学院", "健康管理学院", "经济管理学院", "马克思主义学院", "城乡规划与建筑工程学院", "数学与计算机应用学院", "电子信息与电信工程学院", "化学工程与现代材料学院", "生物医药与食品工程学院"];
    var positionArr = ["教师", "辅导员", "班主任"];

    window.onload = function () {
        allDepartment();
        allPosition();
        piechart();
        employmentRate();
        posttTypeStatistics();
        selectCompCount();
        selectJobCount();
        SelectEmploymentRanking();
    };

//
//     function SelectEmploymentRanking( ){
//
//
//         $.ajax({
//             url: 'manOperat/SelectEmploymentRanking',
//             type: "POST",//REET FULL风格下 增加PUT 删除DELETE 修改POST 查询GET
//             success: function (result) {
//                 var employmentRankingX = [];
//                 var employmentRankingY = [];
//                 console.log(result)
//                 for (var i= 0;i<result.length;i++){
//                     employmentRankingX.push(result[i].name);
//                     employmentRankingY.push(result[i].value);
//
//                     var dom = document.getElementById("piechart1");
//                     var myChart = echarts.init(dom);
//                     var app = {};
//                     option = null;
//                     option = {
//                         tooltip: {
//                             trigger: 'axis',
//                             axisPointer: {            // 坐标轴指示器，坐标轴触发有效
//                                 type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
//                             }
//                         },
//                         grid: {
//                             left: '3%',
//                             right: '4%',
//                             bottom: '3%',
//                             containLabel: true
//                         },
//                         xAxis: [
//                             {
//                                 type: 'category',
//                                 data: employmentRankingX,
//                                 axisTick: {
//                                     alignWithLabel: true
//                                 }
//                             }
//                         ],
//                         yAxis: [
//                             {
//                                 type: 'value'
//                             }
//                         ],
//                         series: [
//                             {
//                                 name: '就业人数',
//                                 type: 'bar',
//                                 barWidth: '60%',
//                                 data: employmentRankingY,
//                                 itemStyle: {
//                                     normal: {
//                                         //好，这里就是重头戏了，定义一个list，然后根据所以取得不同的值，这样就实现了，
//                                         color: function(params) {
//                                             // build a color map as your need.
//                                             var colorList = [
//                                                 '#2F4F4F','#DC143C','#008B8B','#5F9EA0','#27727B',
//                                                 '#708090','#4B0082','#87CEFA','#F3A43B','#60C0DD',
//                                                 '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
//                                             ];
//                                             return colorList[params.dataIndex]
//                                         },
//                                         //以下为是否显示，显示位置和显示格式的设置了
//                                         label: {
//                                             show: true,
//                                             position: 'top',
// //                             formatter: '{c}'
//                                             formatter: '{b}\n{c}'
//                                         },
//                                         barWidth:10,
//                                     }
//                                 },
//
//                             }
//                         ]
//                     };
//                     ;
//                     if (option && typeof option === "object") {
//                         myChart.setOption(option, true);
//                     }
//                  }
//             },
//             error: function (data) {
//
//             }
//         });
//
//     }

    function SelectEmploymentRanking( ){


        $.ajax({
            url: 'manOperat/SelectEmploymentRanking',
            type: "POST",//REET FULL风格下 增加PUT 删除DELETE 修改POST 查询GET
            success: function (result) {
                var employmentRankingX = [];
                var employmentRankingY = [];
                console.log(result)
                for (var i= 0;i<result.length;i++){
                    employmentRankingX.push(result[i].name);
                    employmentRankingY.push(result[i].value);

                    var dom = document.getElementById("piechart1");
                    var myChart = echarts.init(dom);
                    var app = {};
                    option = null;
                    option = {
                        title: {
                            text: '就业人数',
                        },
                        tooltip: {
                            trigger: 'axis',
                            axisPointer: {
                                type: 'shadow'
                            }
                        },
                        // legend: {
                        //     data: ['2011年', '2012年']
                        // },
                        grid: {
                            left: '3%',
                            right: '4%',
                            bottom: '3%',
                            containLabel: true
                        },
                        xAxis: {
                            type: 'value',
                            boundaryGap: [0, 0.01]
                        },
                        yAxis: {
                            type: 'category',
                            data: employmentRankingX
                        },
                        series: [

                            {
                                name: '人数',
                                type: 'bar',
                                data: employmentRankingY,
                                itemStyle: {
                                    normal: {
                                        //好，这里就是重头戏了，定义一个list，然后根据所以取得不同的值，这样就实现了，
                                        color: function(params) {
                                            // build a color map as your need.
                                            var colorList = [
                                                '#2F4F4F','#DC143C','#008B8B','#5F9EA0','#27727B',
                                                '#708090','#4B0082','#87CEFA','#F3A43B','#60C0DD',
                                                '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
                                            ];
                                            return colorList[params.dataIndex]
                                        },
                                        //以下为是否显示，显示位置和显示格式的设置了
                                        label: {

                                            position: 'top',
//                             formatter: '{c}'
                                            formatter: '{b}\n{c}'
                                        },
                                        barWidth:10,
                                    }
                                },
                            }
                        ]
                    };

                    if (option && typeof option === "object") {
                        myChart.setOption(option, true);
                    }
                }
            },
            error: function (data) {

            }
        });

    }

    function  selectCompCount() {

        $.ajax({
            url: 'teaOperat/selectCompCount',
            type: "POST",//REET FULL风格下 增加PUT 删除DELETE 修改POST 查询GET
             success: function (result) {
                // console.log("企业数量："+result);
                document.getElementById("compCount").innerHTML=result;
            },
            error: function (data) {

            }
        });
    }

    function  selectJobCount() {

        $.ajax({
            url: 'teaOperat/selectJobCount',
            type: "POST",//REET FULL风格下 增加PUT 删除DELETE 修改POST 查询GET
            success: function (result) {
                //console.log("招聘岗位数量："+result);
                document.getElementById("jobCount").innerHTML=result;
            },
            error: function (data) {

            }
        });
    }

    function piechart() {
        var dom = document.getElementById("piechart");
        var myChart = echarts.init(dom);
        var app = {};
        optionpiechart = null;
        app.title = '环形图';
        var pieChart = [];
        var pieChartname = [];
        $.ajax({
            url: 'echarts/selectPieChart',
            type: "POST",
            success: function (result) {
                if (result != null) {
                    pieChart = result;
                    optionpiechart.series[0].data = pieChart;
                    // optionpiechart.legend.data=pieChart;
                    myChart.setOption(optionpiechart, true);
                }
            },
            error: function (data) {

            }
        });

        optionpiechart = {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
                // data:['考公务员','考研','短期实习','就业实习','就业未实习','就业工作','在校']
            },
            series: [
                {
                    name: '访问来源',
                    type: 'pie',
                    radius: ['50%', '70%'],
                    avoidLabelOverlap: false,
                    label: {
                        normal: {
                            show: false,
                            position: 'center'
                        },
                        emphasis: {
                            show: true,
                            textStyle: {
                                fontSize: '30',
                                fontWeight: 'bold'
                            }
                        }
                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    data: [
                        {value: 335, name: '就业实习'},
                        {value: 310, name: '短期实习'},
                        {value: 234, name: '就业未实习'},
                        {value: 135, name: '就业工作'},
                        {value: 1548, name: '在校'},
                        {value: 159, name: '考公务员'},
                        {value: 196, name: '考研'}
                    ],
                    // data:pieChart,
                }
            ]
        };


    }

   // 统计行业就业量
    function employmentRate() {

        var dom = document.getElementById("employmentRate");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        option = {
            title: {},
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data: ['计算机软件', '硬件/运维', '经营管理类', '市场营销类', '贸易业务类', '财务类', '人力资源类', '文职类', '客户服务类']
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            toolbox: {
                feature: {
                    saveAsImage: {}
                }
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                data: ['2013', '2014', '2015', '2016', '2017', '2018', '2019']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    name: '计算机软件',
                    type: 'line',
                    stack: '计算机软件',
                    data: [96, 95, 95, 96, 97, 99, 98]
                },
                {
                    name: '硬件/运维',
                    type: 'line',
                    stack: '硬件/运维',
                    data: [78, 79, 80, 78, 81, 80, 82]
                },
                {
                    name: '经营管理类',
                    type: 'line',
                    stack: '经营管理类',
                    data: [45, 46, 47, 47, 45, 46, 48]
                },
                {
                    name: '市场营销类',
                    type: 'line',
                    stack: '市场营销类',
                    data: [50, 52, 51, 52, 53, 52, 53]
                },
                {
                    name: '贸易业务类',
                    type: 'line',
                    stack: '贸易业务类',
                    data: [88, 85, 86, 89, 87, 85, 86]
                }
            ]
        };
        ;
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    }


    function posttTypeStatistics() {

        var xData = [];
        var yData = [];
        $.ajax({
            url: 'echarts/selectkindCount',
            type: "POST",
            success: function (result) {
                let arrlist = result;
                for(let i= 0;i<arrlist.length;i++){
                    xData.push(arrlist[i].stu_compkind);
                    yData.push(arrlist[i].num)
                }
                document.getElementById("kindCount").innerHTML=arrlist.length;
                var dom = document.getElementById("container");
                var myChart = echarts.init(dom);
                var app = {};
                option = null;
                app.title = '坐标轴刻度与标签对齐';

                option = {
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                        }
                    },
                    grid: {
                        left: '3%',
                        right: '4%',
                        bottom: '3%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: xData,
                            axisTick: {
                                alignWithLabel: true
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value'
                        }
                    ],
                    series: [
                        {
                            name: '就业人数',
                            type: 'bar',
                            barWidth: '60%',
                            data: yData,
                            itemStyle: {
                                normal: {
                                    //好，这里就是重头戏了，定义一个list，然后根据所以取得不同的值，这样就实现了，
                                    color: function(params) {
                                        // build a color map as your need.
                                        var colorList = [
                                            '#2F4F4F','#DC143C','#008B8B','#5F9EA0','#27727B',
                                            '#708090','#4B0082','#87CEFA','#F3A43B','#60C0DD',
                                            '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
                                        ];
                                        return colorList[params.dataIndex]
                                    },
                                    //以下为是否显示，显示位置和显示格式的设置了
                                    label: {
                                        show: true,
                                        position: 'top',
//                             formatter: '{c}'
                                        formatter: '{b}\n{c}'
                                    },
                                    barWidth:10,
                                }
                            },
                        }
                    ]
                };
                ;
                if (option && typeof option === "object") {
                    myChart.setOption(option, true);
                }
            },
            error: function (data) {

            }
        });


    }


    function allPosition() {
        var tea_duties = document.getElementById("tea_duties");
        for (var i = 0; i < positionArr.length; i++) {
            var o_l = new Option(positionArr[i], positionArr[i]);
            tea_duties.options.add(o_l);
        }
    }

    function allDepartment() {
        var tea_department = document.getElementById("tea_department");
        for (var i = 0; i < arr.length; i++) {
            var o_l = new Option(arr[i], arr[i]);
            tea_department.options.add(o_l);
        }
    }


    var username = window.sessionStorage.getItem("tea_u_name");
    document.getElementById("currentuser").innerHTML = username;

    function clicklogo() {
        window.location.href = "teacher";
    }

    function general() {
        window.location.href = "general";
    }

    function employmentdistribution() {
        window.location.href = "employmentdistribution";
    }

    function teacherindex() {
        window.location.href = "teacherindex";
    }


    function submitReleaseInfo() {
        var data = $('#myFormInfoRelease').serialize();//表单序列化 form表单的id属性值
        $.ajax({
            url: 'info/TeasubmitReleaseInfo',
            type: "POST",
            data: data,
            success: function (result) {
                if (result == '已保存') {
                    swal("信息发布成功!", "您发布的信息已经录入本系统!", "success");
                } else if (result == '未保存') {
                    swal("请勿重复发布!", "您发布的信息已经存在与本系统!", "error");
                    return false;
                }
            },
            error: function (data) {

            }
        });
    }


    function submitTeaBaseInfo() {
        var data = $('#myFormInfo').serialize();//表单序列化 form表单的id属性值
        $.ajax({
            url: 'user/submitTeaBaseInfo',
            type: "POST",
            data: data,
            success: function (result) {
                if (result == '已保存') {
                    swal("保存成功!", "您的个人基础信息已经录入本系统!", "success");
                } else {

                }
            },
            error: function (data) {

            }
        });
    }

    function selectTeaBaseInfo() {
        $.ajax({
            url: 'user/selectTeaBaseInfo',
            type: "POST",
            success: function (result) {
                if (result != null) {
                    if (result.tea_name != '0') {
                        document.getElementById("tea_name").value = result.tea_name;
                    }
                    if (result.tea_name == 'undefined' || result.tea_name == undefined) {
                        document.getElementById("tea_name").value = '';
                    }

                    if (result.tea_schoolname != '0') {
                        document.getElementById("tea_schoolname").value = result.tea_schoolname;
                    }
                    if (result.tea_schoolname == 'undefined' || result.tea_schoolname == undefined) {
                        document.getElementById("tea_schoolname").value = '';
                    }

                    if (result.tea_department != '0') {
                        document.getElementById("tea_department").value = result.tea_department;
                    }
                    if (result.tea_department == 'undefined' || result.tea_department == undefined) {
                        document.getElementById("tea_department").value = '';
                    }

                    if (result.tea_duties != '0') {
                        document.getElementById("tea_duties").value = result.tea_duties;
                    }
                    if (result.tea_duties == 'undefined' || result.tea_duties == undefined) {
                        document.getElementById("tea_duties").value = '';
                    }

                    if (result.tea_tel != '0') {
                        document.getElementById("tea_tel").value = result.tea_tel;
                    }
                    if (result.tea_tel == 'undefined' || result.tea_tel == undefined) {
                        document.getElementById("tea_tel").value = '';
                    }

                    if (result.tea_qq != '0') {
                        document.getElementById("tea_qq").value = result.tea_qq;
                    }
                    if (result.tea_qq == 'undefined' || result.tea_qq == undefined) {
                        document.getElementById("tea_qq").value = '';
                    }

                    if (result.tea_email != '0') {
                        document.getElementById("tea_email").value = result.tea_email;
                    }
                    if (result.tea_email == 'undefined' || result.tea_email == undefined) {
                        document.getElementById("tea_email").value = '';
                    }

                    if (result.tea_code != '0') {
                        document.getElementById("tea_code").value = result.tea_code;
                    }
                    if (result.tea_code == 'undefined' || result.tea_code == undefined) {
                        document.getElementById("tea_code").value = '';
                    }
                }
            },
            error: function (data) {

            }
        });
    }

    function deleteAcount() {
        swal({
            title: "确认注销账号吗?",
            text: "账号一旦注销,将无法找回,注册不易,且行且珍惜",
            icon: "warning",
            dangerMode: true,
            buttons: ["考虑一下", "含泪注销"],
        }).then(function (ok) {
            if (ok) {
                $.ajax({
                    url: 'user/teadeleteAcount',
                    method: 'delete',
                    dataType: 'json',
                    success: function (result) {
                        if (result == '已注销') {
                            swal("注销成功!", "期待您下次使用本系统!", "success");
                            window.location.href = "login";
                        } else {
                            swal("注销失败!", "你的账户目前不能被注销!", "error");
                        }
                    },
                    error: function (data) {
                        swal("注销成功!", "期待您下次使用本系统!", "success");
                        window.location.href = "login";
                    }
                });
            } else {
                swal("很开心您放弃了本次操作!");
            }
        });


    }

    function loginout() {

        swal({
            title: "确认退出当前账号吗?",
            icon: "warning",
            dangerMode: true,
            buttons: ["取消", "确认"],
        }).then(function (ok) {
            if (ok) {
                $.ajax({
                    url: "/user/tealoginout",//url 统一资源定位符
                    type: "POST",
                    success: function (result) {
                        if (result == '已退出') {
                            window.location.href = "tealogin";
                            swal("退出成功!", "再次登录请前往登陆页面", "success");
                        } else {
                            swal("退出失败!", "请检查网络或联系管理员", "error");
                        }
                    },
                    error: function (data) {
                        swal("退出成功!", "再次登录请前往登陆页面", "success");
                    }
                });
            } else {
                swal("很开心您放弃了本次操作!");
            }
        });


    }


    function checkpwd() {
        var u_oldpwd = document.getElementById("u_oldpwd").value;
        if (u_oldpwd == null || u_oldpwd == '') {
            swal("原密码不能为空!", "请输入原密码进行密码修改", "error");
            return false;
        }
        $.ajax({
            url: "/user/teacheckpwd?u_oldpwd=" + u_oldpwd,//url 统一资源定位符
            type: "POST",
            success: function (result) {
                if (result == '密码存在') {

                } else {
                    swal("原密码错误", "如忘记密码可在登录页进行忘记密码操作", "error");
                }
            },
            error: function (data) {

            }
        });
    }

    function submitpwd() {
        var u_newpwd = document.getElementById("u_newpwd").value;
        var u_surenewpwd = document.getElementById("u_surenewpwd").value;

        if (u_newpwd == null || u_newpwd == '') {
            swal("新密码不能为空!", "请输入新密码进行密码修改", "error");
            return false;
        }

        if (u_newpwd.length < 7) {
            swal("新密码须超过6位!", "请重新输入", "error");
            document.getElementById("u_newpwd").value = "";
            document.getElementById("u_surenewpwd").value = "";
            return false;
        }
        if (u_newpwd != u_surenewpwd) {
            swal("两次密码不一致", "请重新输入密码", "error");
            document.getElementById("u_newpwd").value = "";
            document.getElementById("u_surenewpwd").value = "";
            return false;
        }
        $.ajax({
            url: "/user/teaupdatepwd?u_newpwd=" + u_newpwd,//url 统一资源定位符
            type: "POST",
            success: function (result) {
                if (result == '已修改') {
                    swal("修改成功!", "下次登陆请使用新密码进行登录", "success");
                } else {
                    swal("原密码错误", "如忘记密码可在登录页进行忘记密码操作", "error");
                }
            },
            error: function (data) {

            }
        });
    }


</script>


</body>
</html>
